<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let name = 'zs';
        let age = 'age';
        let sayHa = 'sayHaaaa';
        let obj = {
            name,
            age,
            //属性名简写
            sayHi: function () { },
            sayHa: () => { },

            //方法速写，  不是箭头函数
            setSay() {
                alert('fanfan hasgone, but wei is coming ')
            },

            //可以写成计算属性名
            [sayHa]() {
                alert('xxx')
            }
        }


    </script>
</body>

</html>